<?php
declare(strict_types=1);

namespace App\Model;



use Hyperf\Database\Model\Events\Saving;
use Hyperf\Cache\Annotation\Cacheable;
use Qbhy\HyperfAuth\Authenticatable;
/**
 * @property $id
 * @property $name
 * @property $mobile
 * @property $created_at
 * @property $updated_at
 */
class User extends Model implements Authenticatable
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    // protected $table = 'users';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    // protected $fillable = ['id', 'name', 'gender', 'created_at', 'updated_at'];
    protected array $hidden = ['created_at', 'updated_at', 'password', 'remember_token'];


    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
    }

    public function getId()
    {
        return $this->id;
    }

    public static function retrieveById($key): ?Authenticatable
    {
        return self::find($key);
    }

}